<!doctype html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<body>

	<th:block th:fragment="head(title,keyword,description)">
		<title th:text="${title}"></title>
		<!-- UIkit CSS -->
		<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.28/css/uikit.min.css" />
		<link rel="stylesheet" th:href="@{/assets/css/theme.css}" />

		<!-- jQuery is required -->
		<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

		<!-- UIkit JS -->
		<script src="http://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.28/js/uikit.min.js"></script>
		<script src="http://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.28/js/uikit-icons.min.js"></script>
	</th:block>

	<th:block th:fragment="header">
		<header uk-sticky="sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky; bottom: #transparent-sticky-navbar">
			<nav class="uk-navbar-container" uk-navbar="mode: click">

				<div class="uk-navbar-left">
					<a class="uk-navbar-item uk-logo" th:href="@{/console}" th:text="#{site.name}"></a>
				</div>

				<div class="uk-navbar-right uk-hidden@m">
					<a class="uk-navbar-toggle" href="#offcanvas-nav" uk-toggle uk-navbar-toggle-icon></a>
				</div>

				<div class="uk-navbar-right uk-visible@m">
					<ul class="uk-navbar-nav user-nav">
						<li><a href="javascript:;" th:text="${currentUser.name}"></a>
							<div class="uk-navbar-dropdown">
								<ul class="uk-nav uk-navbar-dropdown-nav">
									<li><a th:href="@{/logout}">退出</a></li>
								</ul>
							</div></li>
					</ul>
				</div>
			</nav>
		</header>
	</th:block>

	<th:block th:fragment="sidebar(menu)">
		<aside class="tm-sidebar-left uk-visible@m">
			<h4>菜单</h4>
			<ul class="uk-nav-default uk-nav-parent-icon" uk-nav>
				<li th:classappend="${menu=='dashboard'}?'uk-active':''"><a th:href="@{/console}">工作台</a></li>
				<li class="uk-parent" th:classappend="${#strings.startsWith(menu,'document')}?'uk-open':''"><a
					href="javascript:;">文库管理</a>
					<ul class="uk-nav-sub">
						<li th:classappend="${menu=='document_list'}?'uk-active':''"><a th:href="@{/console/document}">文库列表</a></li>
					</ul></li>
				<li class="uk-parent" th:classappend="${#strings.startsWith(menu,'member')}?'uk-open':''"><a
					href="javascript:;">人员管理</a>
					<ul class="uk-nav-sub">
						<li th:classappend="${menu=='member_admin'}?'uk-active':''"><a th:href="@{/console/admin}">管理员列表</a></li>
					</ul></li>
			</ul>
		</aside>
		<div id="offcanvas-usage" uk-offcanvas>
			<div id="offcanvas-nav" uk-offcanvas="overlay: true">
				<div class="uk-offcanvas-bar">
					<button class="uk-offcanvas-close" type="button" uk-close></button>

					<ul class="uk-nav-default uk-nav-parent-icon uk-margin-top" uk-nav>
						<li class="uk-parent"><a href="javascript:;" th:text="${currentUser.name}">user</a>
							<ul class="uk-nav-sub">
								<li><a th:href="@{/logout}">退出</a></li>
							</ul></li>
						<li class="uk-nav-divider"></li>
						<li th:classappend="${menu=='dashboard'}?'uk-active':''"><a th:href="@{/console}">工作台</a></li>
						<li class="uk-parent" th:classappend="${#strings.startsWith(menu,'document')}?'uk-open':''"><a
							href="javascript:;">文库管理</a>
							<ul class="uk-nav-sub">
								<li th:classappend="${menu=='document_list'}?'uk-active':''"><a th:href="@{/console/document}">文库列表</a></li>
							</ul></li>
						<li class="uk-parent" th:classappend="${#strings.startsWith(menu,'member')}?'uk-open':''"><a
							href="javascript:;">人员管理</a>
							<ul class="uk-nav-sub">
								<li th:classappend="${menu=='member_admin'}?'uk-active':''"><a th:href="@{/console/admin}">管理员列表</a></li>
							</ul></li>
					</ul>

				</div>
			</div>
		</div>
	</th:block>

	<th:block th:fragment="footer">
		<footer id="footer">
			&copy; 2015-
			<script>
				document.write(new Date().getFullYear())
			</script>
			<a href="http://www.whenling.com">当凌科技</a>, 保留所有权利.
		</footer>
	</th:block>

</body>
</html>